def make_chocolate(small, big, goal):
  max_big_needed = goal//5
  if max_big_needed>big:
    max_big_needed = big
  remaining = goal-max_big_needed*5
  if remaining<=small:
      return remaining
  else:
    return-1